import type { MockMethod } from 'vite-plugin-mock';
import { getConstantRoutes, getUserRoutes, isRouteExist } from './api/route';

export default [
  {
    url: '/route/getConstantRoutes',
    method: 'get',
    response: () => {
      return getConstantRoutes();
    }
  },
  {
    url: '/route/getUserRoutes',
    method: 'get',
    response: () => {
      return getUserRoutes();
    }
  },
  {
    url: '/route/isRouteExist',
    method: 'get',
    response: (options: { query: { routeName: string } }) => {
      const { routeName } = options.query;
      return isRouteExist(routeName);
    }
  }
] as MockMethod[]; 